import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { Http } from '@angular/http';
// import {IndexPage} from '../index/index';
import {Share} from '../../providers/share';
@IonicPage()
@Component({
  selector: 'page-login',
  templateUrl: 'login.html',
})
export class LoginPage {

  constructor(public navCtrl: NavController, 
    public navParams: NavParams,
    public share:Share,
    public http:Http
  ) {
  }

  // 定义数据
  userName:null;//用户名
  userPassword:null;//账户密码
  cucumber:true;
  listDate:null;
  updateCucumber(){
    console.log(this.cucumber);
  }
  weixin(){
    // console.log(22);
    this.share.weChatAuth();
  }
  log(){
    
    this.http.request('/api/plat/getHeadMd')
    .subscribe((Response)=>{
        console.log( Response.json());
        console.log('登陆'+Response);
    },(err)=>{
      console.log('未登录'+err)
    })
  }
}
